This resource endpoint retrieves a given query roleset.
A successful call to the endpoint will return 200 (OK). This is the standard response for successful HTTP requests. A response code of 400 (Bad Request) indicates that the query roleset does not exist or the payload is malformed. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges for this action.
Produces | |
---|---|
application/xml | XML Content |
application/json | JSON Content |
text/html | HTML Web Content |
manage-user
role, or the following privilege:
http://marklogic.com/xdmp/privileges/manage
The structure of the output returned from this REST API is as follows:
query-roleset
This is a complex structure with the following children:
role-id
role-name
curl --anyauth --user username:password -i -X GET -H "Accept: application/xml" \ http://localhost:8002/manage/v2/query-rolesets/15465490467826729837/properties ==> MarkLogic returns a response similar to the following: HTTP/1.1 200 OK ETag: 26c9d29700d65c02560b38a57935cc00 Content-type: application/xml; charset=UTF-8 Cache-Control: no-cache Expires: -1 Server: MarkLogic Content-Length: 267 Connection: Keep-Alive Keep-Alive: timeout=5 <query-roleset-properties xmlns="http://marklogic.com/manage/query-roleset/properties"> <query-roleset> <role-name>els-role-1</role-name> <role-name>els-role-2</role-name> <role-name>els-role-3</role-name> </query-roleset> </query-roleset-properties>
curl --anyauth --user username:password -i -X GET -H "Accept: application/json" \ http://localhost:8002/manage/v2/query-rolesets/15465490467826729837/properties ==> MarkLogic returns a response similar to the following: HTTP/1.1 200 OK ETag: 26c9d29700d65c02560b38a57935cc00 Content-type: application/json; charset=UTF-8 Cache-Control: no-cache Expires: -1 Server: MarkLogic Content-Length: 56 Connection: Keep-Alive Keep-Alive: timeout=5 { "role-name": ["els-role-1", "els-role-2", "els-role-3" ] }